package com.yhyvr.service;

import com.lz.mybatis.generator.util.StringUtil;
import com.lz.mybatis.jdbc.auto.dao.BoProxyMapper;
import com.lz.mybatis.jdbc.auto.dao.BoProxyOrderMapper;
import com.lz.mybatis.jdbc.auto.model.BoProxy;
import com.lz.mybatis.jdbc.auto.model.BoProxyOrder;
import com.lz.mybatis.jdbc.auto.model.BoProxyOrderExample;
import com.yhyvr.pojo.ApiConstant;
import org.apache.commons.lang3.StringUtils;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * Created by zhangqin on 2016/12/1.
 */
@Service
public class ProxyServiceI {

    @Resource
    private BoProxyMapper boProxyMapper;

    public boolean isBindPhone(String proxyId){
        if(StringUtils.isBlank(proxyId)||proxyId.equals("0000000000000000000000000")){
            return false;
        }
        BoProxy boProxy = boProxyMapper.selectByPrimaryKey(proxyId);
        if(boProxy!=null){
            return StringUtils.isNotBlank(boProxy.getBoProxyPhone());
        }
        return false;
    }
}
